package XMLForms;

import java.util.Date;

public class TTRM {

    //Attributes
    protected String buySell;
    protected String offererID;
    protected String traderID;
    protected int shareCount;
    protected String stockID;
    protected int offerTime;
    protected long traderTimeSentStamp;
    protected double sharePrice;

    //Constructor
    public TTRM(String BuySell, String OffererID, String TraderID,
            int ShareCount, String StockID, int OfferTime,
            Date TraderTimeSentStamp, double price) {
        this.buySell = BuySell;
        this.offererID = OffererID;
        this.traderID = TraderID;
        this.shareCount = ShareCount;
        this.stockID = StockID;
        this.offerTime = OfferTime;
        this.traderTimeSentStamp = TraderTimeSentStamp.getTime();
        this.sharePrice = price;
    }

    public TTRM(String string, String string0, String string1, int i,
            String string2, int i0, Date time) {
        throw new UnsupportedOperationException("Not yet implemented");
    }

    public double getSharePrice() {
        return sharePrice;
    }

    //Getters and Setters
    public String getBuySell() {
        return buySell;
    }

    public void setBuySell(String buySell) {
        this.buySell = buySell;
    }

    public String getOffererID() {
        return offererID;
    }

    public void setOffererID(String offererID) {
        this.offererID = offererID;
    }

    public String getTraderID() {
        return traderID;
    }

    public void setTraderID(String traderID) {
        this.traderID = traderID;
    }

    public int getShareCount() {
        return shareCount;
    }

    public void setShareCount(int shareCount) {
        this.shareCount = shareCount;
    }

    public String getStockID() {
        return stockID;
    }

    public void setStockID(String stockID) {
        this.stockID = stockID;
    }

    public int getOfferTime() {
        return offerTime;
    }

    public void setOfferTime(int offerTime) {
        this.offerTime = offerTime;
    }

    public long getTraderTimeSentStamp() {
        return traderTimeSentStamp;
    }

    public void setTraderTimeSentStamp(Date traderTimeSentStamp) {
        this.traderTimeSentStamp = traderTimeSentStamp.getTime();
    }

    //toString method
    @Override
    public String toString() {
        return "TTRM [BuySell=" + buySell + ", OfferID=" + offererID
                + ", TraderID=" + traderID + ", ShareCount=" + shareCount
                + ", StockID=" + stockID + ", OfferTime=" + offerTime
                + ", TraderTimeSentStamp=" + traderTimeSentStamp + ", "
                + "SharePrice=" + sharePrice + "]";
    }
}
